Repository navigation
Catch up with Hookdeck's source types without breaking GitLab - #33
Merged
Merged
Conversation
The weekly drift check has failed every run since it was added on 17 August, so the Source Type dropdown has been missing every platform Hookdeck added since: 35 of them as of today, 151 types offered against 186 supported. Regenerating was not enough on its own. GitLab's auth schema gained an `auth_type` with a choice of Standard Webhooks or GitLab's own scheme, and the generator read any `auth_type` as "a choice the node cannot make", which would have made the node refuse a GitLab Webhook Secret outright. But the node sends `auth_type` set to the source type with every platform secret, so for GitLab it already names a scheme, and the spec puts that scheme's secret in `api_key`, where the node already sends it. The generator now resolves a choice to the type's own scheme when one exists, which leaves GitLab exactly as it was and gives Grafana field-level guidance instead of a bare "choice". ShipStation went the other way. Its auth schema became an empty object that admits no properties, so the `public_key` the node used to send now has nowhere to go. It regenerates as taking no secret, and the node refuses one before publish, with a message, instead of passing on a rejection from Hookdeck. Choice-of-scheme types carry no `x-docs-type`, so GitLab's label silently regressed to "Gitlab" and two new types came out as "Google Pubsub" and "Sendgrid Inbound". They are overridden alongside the existing exceptions. The live suite gains two checks so the claims above rest on the API rather than on the spec: that Hookdeck accepts the GitLab request the node sends, and that it rejects the ShipStation request the node used to send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first commit read ShipStation's now-empty auth schema as "takes no
secret", and its live check asserted Hookdeck rejects the public_key the
node used to send. Hookdeck accepted it. Hookdeck's own code explains why,
and shows that "takes no secret" was the wrong reading in a way that leaves
sources unverified.
Hookdeck validates requests with Joi's stripUnknown, so a field it does not
expect is dropped rather than rejected. The public_key vanished; the `auth`
object around it did not, and that object is what matters: Hookdeck creates
a source's verification only when the request carries `auth`, even `{}`.
ShipStation (keys from its public JWKS since 3 October) and AWS SNS (signing
certificate named in each message) are verified with keys Hookdeck fetches
itself, so they have nothing to enter. Created without `auth`, they get no
verification and accept unsigned requests.
The node never sent `auth` for AWS SNS, classed as "none" since August, and
its refusal of a secret told users Hookdeck verified the platform without
one. On main, ShipStation was verified only if the user typed a public key
Hookdeck no longer reads. With the first commit it would never have been.
The spec cannot tell these two apart from Docker Hub or WordPress.com, which
Hookdeck does not verify at all: the auth schemas are identical. So the
generator lists them as `keyless`, and throws if the spec ever gives one of
them fields, which the weekly drift check will then report. The node sends
`auth: {}` for them when Webhook Secret is empty, and Source Config (JSON)
of {"auth": null} still turns verification off.
Google Pub/Sub was misread too. Hookdeck names schemas after labels, so
"Google Pub/Sub" puts an unescaped slash in its $ref, and `deref` looked up
the last path segment, "SubAuth", which does not exist. Pub/Sub requires
`audience` and `service_account_email`, and now says so. Its label comes
from the same schema, so its override goes.
The refusal for "none" types no longer claims Hookdeck verifies them or
rejects a stray secret, and the Webhook Secret description no longer says
an empty field always skips verification.
The live check now provisions both types through the trigger and asserts the
source reports `authenticated: true`, against a bare source of the same type
that should report false.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 22, 2026
leggetter
added a commit
that referenced
this pull request
Nov 5, 2026
…tform needs a secret (#35) Issue #12 asked for a note on how n8n stores the key and whether there is a route other than pasting it into the editor, because that is the first question a security review asks and the Cloud and self-hosted answers differ. It proposed saying there is no environment-variable route. Checked against n8n 2.44.6's source, there is one: CREDENTIALS_OVERWRITE_DATA fills a credential field from the environment without storing it in the credential, and the editor then hides that field. That pins every Hookdeck credential made in the editor to one project, which the docs now say. So Getting started lists what does work, with its catch: external secrets ($secrets, Enterprise on Cloud and self-hosted), credential overwrites on self-hosted, and the public API or `n8n import:credentials` for scripted setups. It also says why `$env` is not on the list: n8n 2.x blocks it unless N8N_BLOCK_ENV_ACCESS_IN_NODE=false, which reopens environment access to every node on the instance, and Cloud has no environment to read. Separately, four places told users verification needs a Webhook Secret. That stopped being true when #33 had the node switch verification on for AWS SNS and ShipStation, which Hookdeck verifies with keys it fetches itself. The README security model, Getting started, Security and the trigger reference now name the exception. Closes #12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekly Source type drift check has failed on every run since it was added on 17 August (9 failures, then a run on 19 October that hung in
npm ciand was cancelled at the 6-hour limit). So the Source Type dropdown has been missing every platform Hookdeck added since: 151 types offered against 186 supported as of today.I reproduced the failure locally before changing anything. It is real drift, not a quirk of the check: the generated file is byte-identical under
en_US.UTF-8andC.UTF-8, so thelocaleComparesort is not the cause.Why regenerating alone was wrong
mainfields: ['api_key']choice, so the node would refuse a GitLab Webhook Secretfields: ['api_key'], unchangedfields: ['public_key']none, so a source would never be verifiedkeyless: the node sendsauth: {}none: never verifiednonekeyless: the node sendsauth: {}none, a misread$reffields: ['audience', 'service_account_email']GitLab gained
auth_type: STANDARD_WEBHOOKS | GITLAB. The generator read anyauth_typeas a choice the node cannot make. ButbuildSourceConfigsendsauth_typeset to the source type with every platform secret, so for GitLab the node already names a scheme, and that scheme takesapi_key, where the node already puts it. The generator now resolves a choice to the type's own scheme when one exists. That keeps GitLab as it was and turns Grafana from a bare "choice" into a refusal that names its three fields.ShipStation and AWS SNS are verified with keys Hookdeck fetches itself. ShipStation has used its public JWKS since 3 October (core #5711); before that it took a
public_key. But Hookdeck creates a source's verification only when the request carriesauth, even{}(server/controllers/Source.tsin core). A source created without it accepts unsigned requests.auth, so every SNS source it created was unverified. Its refusal of a secret also told users "Hookdeck verifies this platform without one".main: verified only when the user typed a public key. Hookdeck strips the key (it validates with JoistripUnknown), but theauthobject around it survives.The spec cannot tell these two from Docker Hub or WordPress.com, which Hookdeck does not verify at all, because their auth schemas are identical. So the generator lists them in
KEYLESS_VERIFICATION, and throws if the spec ever gives one fields, which the drift check then reports.{"auth": null}in Source Config (JSON) still turns verification off.Google Pub/Sub. Hookdeck names schemas after labels, so "Google Pub/Sub" puts an unescaped
/in its$ref(#/components/schemas/SourceConfigGooglePub/SubAuth).dereftook the last path segment, found nothing, and read Pub/Sub as taking no secret. It now resolves the whole name.Labels. Choice-of-scheme types carry no
x-docs-typeof their own, so GitLab would have regressed to "Gitlab" and SendGrid Inbound Parse would read "Sendgrid Inbound". Both are inLABEL_OVERRIDES. Pub/Sub's label now comes from the spec.Wording. The
nonerefusal no longer claims Hookdeck verifies those platforms or rejects a stray secret. The Webhook Secret description no longer says an empty field always skips verification.How this was established
auth: { public_key }. Hookdeck accepted it, so thenonereading was unproven.origin/masterandstaging):Source.tsonly creates an integration whenauthis present.authenticatedin the source response is!!source.verification.AWS_SNSandSHIPSTATIONhave a verification feature with no fields.authenticated: true. As a control, a bare source of each type created withoutauthmust reportfalse. This run is where that is proven against the API.Tests
api_key; Azure Event Grid and SendGrid Inbound Parse staychoice)$refauth: {}, refusing a secret, and opting out with{"auth": null}api.test.mjs): GitLab's request is accepted, and keyless sources reportauthenticatedagainst a bare control.Verification
npm run build, 120 unit tests,npm run lint(0 errors; the 2 icon warnings are already onmain),npm run scan,verify-package-load.mjsandnpm run check:source-types(186 types) all pass locally.mainalready fails on. None of the flagged lines are ones this PR adds.Not in this PR
config, but core's top-levelauthenticatedshould differ. That part is unverified here; it could fix the README trap section.timeout-minutesin any workflow, which is why the 19 October hang ran for 6 hours.describeHookdeckPayloadreturns text bodies as they are./in schema names.additionalProperties: falsein the spec while the API strips silently.auth, which nothing in the spec tells an API user.🤖 Generated with Claude Code